﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Ordering.aspx.cs" Inherits="Web_Ordering" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>订单信息</title>
    <link href="../App_Themes/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/css/main.css" rel="stylesheet" type="text/css" />
    <script src="../App_Themes/js/jQuery-1.11.3.js" type="text/javascript"></script>
    <script src="/../App_Themes/js/bootstrap.min.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">

    <h2>
        <strong style="margin: 2%;">
        <asp:TextBox Style="display: none;" ID="BookId" runat="server"></asp:TextBox>
            <asp:TextBox Style="display: none;" ID="CartId" runat="server"></asp:TextBox>
            <asp:TextBox Style="display: none;" ID="Count" runat="server"></asp:TextBox>
            <asp:TextBox Style="display: none;" ID="Money" runat="server"></asp:TextBox>
        <asp:Button class="btn btn-sm btn-outline-secondary" ID="BtnAddOrder" runat="server" Text="提交订单" Style="display: none;" OnClick="BtnAddOrder_Click"/>
    </h2>
    <div id="page_cart" class="card">
        <table class="table table-hover text-center">
            <tbody>
                <%=OrderInfor %>
            </tbody>
        </table>
        <h1 class="text-center text-info">
            <asp:Label ID="EmptyInfo" runat="server" Text=""></asp:Label></h1>
        <br />
    </div>

        
    <script>
        $(function () {
            // 提交订单按钮
            $("#btnAddOrder").click(function () {
                var bookId = $("#bookId").val();
                var count = $("#num").val();
                var money = $("#money").val();
                var cartId = $("#cartId").val();

                $(<%=BookId.ClientID%>).val(bookId);
                $(<%=Count.ClientID%>).val(count);
                $(<%=Money.ClientID%>).val(money);
                $(<%=CartId.ClientID%>).val(cartId);
                $(<%=BtnAddOrder.ClientID%>).click();
                
            });
        });
    </script>


    </form>
</body>
</html>
